Stabilize vertical-tab drag visuals: overlay drop marker + post-drop hover reset#2964
Stabilize vertical-tab drag visuals: overlay drop marker + post-drop hover reset#2964
Conversation
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Deploying waveterm with
|
| Latest commit: |
48919f6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bd31d368.waveterm.pages.dev |
| Branch Preview URL: | https://copilot-create-vertical-tab.waveterm.pages.dev |
vtab/vtabbar)
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
vtab/vtabbar)Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
| export interface VTabItem { | ||
| id: string; | ||
| name: string; | ||
| indicator?: TabIndicator | null; |
There was a problem hiding this comment.
CRITICAL: Missing import for TabIndicator type
The TabIndicator type is used here but not imported. It's defined in frontend/types/gotypes.d.ts as a global type, but TypeScript may not resolve it correctly without proper context. Additionally, the TabIndicator type has a required priority: number field that is not being handled in this interface definition.
The global TabIndicator type includes:
icon: string(required)color?: string(optional)priority: number(required)clearonfocus?: boolean(optional)persistentindicator?: TabIndicator(optional)
This will cause runtime issues when the indicator is used without the required priority field.
|
|
||
| const InitialTabs: VTabItem[] = [ | ||
| { id: "vtab-1", name: "Terminal" }, | ||
| { id: "vtab-2", name: "Build Logs", indicator: { icon: "bell", color: "#f59e0b" } }, |
There was a problem hiding this comment.
CRITICAL: Missing required priority field in TabIndicator
The TabIndicator type (defined in frontend/types/gotypes.d.ts) has a required priority: number field. This indicator object is missing it, which will cause type errors and potential runtime issues.
| { id: "vtab-2", name: "Build Logs", indicator: { icon: "bell", color: "#f59e0b" } }, | |
| { id: "vtab-2", name: "Build Logs", indicator: { icon: "bell", color: "#f59e0b", priority: 1 } }, |
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (3 files)
|
Dragging in the vertical tab bar had two UX artifacts: the drop marker reserved layout space (leaving a visible accent gap above selected tabs), and hover styling could remain on the old row after drop until the mouse moved. This updates drag visuals to be overlay-based and forces hover recalculation at drag end.
Drop marker moved out of flow (no selected-tab accent gap)
offsetTop/offsetHeight) so it covers the divider location directly.Drop target rendering simplified
relative; marker is conditionally rendered only while reordering.dropLineTopis tracked during drag events and used to position the marker without affecting layout.Stale hover state cleared after drop
hoverResetVersion) and used it inVTabkeys.:hoveron the old index immediately.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.